﻿using System;
using ParticlePlayground;
using UnityEngine;

// Token: 0x02000151 RID: 337
[ExecuteInEditMode]
public class PlaygroundTrailParent : MonoBehaviour
{
	// Token: 0x0600075C RID: 1884 RVA: 0x0002B678 File Offset: 0x00029878
	public virtual void Awake()
	{
		this._gameObject = base.gameObject;
	}

	// Token: 0x0600075D RID: 1885 RVA: 0x0002B688 File Offset: 0x00029888
	public virtual void Update()
	{
		if (this._gameObject != this.trailsReference.GetParentGameObject())
		{
			if (Application.isPlaying)
			{
				UnityEngine.Object.Destroy(this._gameObject);
			}
			else
			{
				UnityEngine.Object.DestroyImmediate(this._gameObject);
			}
		}
	}

	// Token: 0x0400076C RID: 1900
	public ParticlePlayground.PlaygroundTrails trailsReference;

	// Token: 0x0400076D RID: 1901
	protected GameObject _gameObject;
}
